import { ref, reactive, type Ref } from 'vue'
import { defineStore } from 'pinia'
import { store } from '@/stores'

const _useDesktopStore = defineStore('desktop', () => {
  const selectedIndex = ref(NaN)

  function setSelectedIndex(index: number) {
    selectedIndex.value = index
  }

  return {
    selectedIndex,
    setSelectedIndex
  }
})

export function useDesktopStore() {
  return _useDesktopStore(store)
}
